import {
	// createMemoryHistory,
	createRouter,
	createWebHistory
} from 'vue-router'

import HomeView from '../pages/home/index.vue'

const routes = [{
	path: '/',
	component: HomeView
}, ]

const router = createRouter({
	history: createWebHistory(),
	routes,
})
// BAD
router.beforeEach((to, from, next) => {
	// if (to.name !== 'Login' && !isAuthenticated) next({
	// 	name: 'Login'
	// })
	// 如果用户未能验证身份，则 `next` 会被调用两次
	next()
})
export default router;